﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WChat
{
    public partial class EmojiPanel : UserControl
    {

        public delegate void EmojiEventHandler(string msg);
        public event EmojiEventHandler Epanel;

        public EmojiPanel()
        {
            InitializeComponent();
        }

        private void EmojiPanel_Load(object sender, EventArgs e)
        {
            this.button1.Click += new EventHandler(this.BtnGen);
            this.button2.Click += new EventHandler(this.BtnGen);
            this.button3.Click += new EventHandler(this.BtnGen);
            this.button4.Click += new EventHandler(this.BtnGen);
            this.button5.Click += new EventHandler(this.BtnGen);
            this.button6.Click += new EventHandler(this.BtnGen);
            this.button7.Click += new EventHandler(this.BtnGen);
            this.button8.Click += new EventHandler(this.BtnGen);
            this.button9.Click += new EventHandler(this.BtnGen);
            this.button10.Click += new EventHandler(this.BtnGen);
            this.button11.Click += new EventHandler(this.BtnGen);
            this.button12.Click += new EventHandler(this.BtnGen);
            this.button13.Click += new EventHandler(this.BtnGen);
            this.button14.Click += new EventHandler(this.BtnGen);
            this.button15.Click += new EventHandler(this.BtnGen);
            this.button16.Click += new EventHandler(this.BtnGen);
            this.button17.Click += new EventHandler(this.BtnGen);
            this.button18.Click += new EventHandler(this.BtnGen);
            this.button19.Click += new EventHandler(this.BtnGen);
            this.button20.Click += new EventHandler(this.BtnGen);
            this.button21.Click += new EventHandler(this.BtnGen);
            this.button22.Click += new EventHandler(this.BtnGen);
            this.button23.Click += new EventHandler(this.BtnGen);
            this.button24.Click += new EventHandler(this.BtnGen);
            this.button25.Click += new EventHandler(this.BtnGen);
            this.button26.Click += new EventHandler(this.BtnGen);
            this.button27.Click += new EventHandler(this.BtnGen);
            this.button28.Click += new EventHandler(this.BtnGen);
            this.button29.Click += new EventHandler(this.BtnGen);
            this.button30.Click += new EventHandler(this.BtnGen);
            this.button31.Click += new EventHandler(this.BtnGen);
            this.button32.Click += new EventHandler(this.BtnGen);
            this.button33.Click += new EventHandler(this.BtnGen);
            this.button34.Click += new EventHandler(this.BtnGen);
            this.button35.Click += new EventHandler(this.BtnGen);
            this.button36.Click += new EventHandler(this.BtnGen);
            this.button37.Click += new EventHandler(this.BtnGen);
            this.button38.Click += new EventHandler(this.BtnGen);
            this.button39.Click += new EventHandler(this.BtnGen);
            this.button40.Click += new EventHandler(this.BtnGen);
            this.button41.Click += new EventHandler(this.BtnGen);
            this.button42.Click += new EventHandler(this.BtnGen);
            this.button43.Click += new EventHandler(this.BtnGen);
            this.button44.Click += new EventHandler(this.BtnGen);
            this.button45.Click += new EventHandler(this.BtnGen);
            this.button46.Click += new EventHandler(this.BtnGen);
            this.button47.Click += new EventHandler(this.BtnGen);
            this.button48.Click += new EventHandler(this.BtnGen);
            this.button49.Click += new EventHandler(this.BtnGen);
            this.button50.Click += new EventHandler(this.BtnGen);
            this.button51.Click += new EventHandler(this.BtnGen);
            this.button52.Click += new EventHandler(this.BtnGen);
            this.button53.Click += new EventHandler(this.BtnGen);
            this.button54.Click += new EventHandler(this.BtnGen);
            this.button55.Click += new EventHandler(this.BtnGen);
            this.button56.Click += new EventHandler(this.BtnGen);
            this.button57.Click += new EventHandler(this.BtnGen);
            this.button58.Click += new EventHandler(this.BtnGen);
            this.button59.Click += new EventHandler(this.BtnGen);
            this.button60.Click += new EventHandler(this.BtnGen);
            this.button61.Click += new EventHandler(this.BtnGen);
            this.button62.Click += new EventHandler(this.BtnGen);
            this.button63.Click += new EventHandler(this.BtnGen);
            this.button64.Click += new EventHandler(this.BtnGen);
            this.button65.Click += new EventHandler(this.BtnGen);
            this.button66.Click += new EventHandler(this.BtnGen);
            this.button67.Click += new EventHandler(this.BtnGen);
            this.button68.Click += new EventHandler(this.BtnGen);
            this.button69.Click += new EventHandler(this.BtnGen);
            this.button70.Click += new EventHandler(this.BtnGen);
            this.button71.Click += new EventHandler(this.BtnGen);
            this.button72.Click += new EventHandler(this.BtnGen);
            this.button73.Click += new EventHandler(this.BtnGen);
            this.button74.Click += new EventHandler(this.BtnGen);
            this.button75.Click += new EventHandler(this.BtnGen);
            this.button76.Click += new EventHandler(this.BtnGen);
            this.button77.Click += new EventHandler(this.BtnGen);
            this.button78.Click += new EventHandler(this.BtnGen);
            this.button79.Click += new EventHandler(this.BtnGen);
            this.button80.Click += new EventHandler(this.BtnGen);
            this.button81.Click += new EventHandler(this.BtnGen);
            this.button82.Click += new EventHandler(this.BtnGen);
            this.button83.Click += new EventHandler(this.BtnGen);
            this.button84.Click += new EventHandler(this.BtnGen);
            this.button85.Click += new EventHandler(this.BtnGen);
            this.button86.Click += new EventHandler(this.BtnGen);
            this.button87.Click += new EventHandler(this.BtnGen);
            this.button88.Click += new EventHandler(this.BtnGen);
            this.button89.Click += new EventHandler(this.BtnGen);
            this.button90.Click += new EventHandler(this.BtnGen);
            this.button91.Click += new EventHandler(this.BtnGen);
            this.button92.Click += new EventHandler(this.BtnGen);
            this.button93.Click += new EventHandler(this.BtnGen);
            this.button94.Click += new EventHandler(this.BtnGen);
            this.button95.Click += new EventHandler(this.BtnGen);
            this.button96.Click += new EventHandler(this.BtnGen);
            this.button97.Click += new EventHandler(this.BtnGen);
            this.button98.Click += new EventHandler(this.BtnGen);
            this.button99.Click += new EventHandler(this.BtnGen);
            this.button100.Click += new EventHandler(this.BtnGen);
            this.button101.Click += new EventHandler(this.BtnGen);
            this.button102.Click += new EventHandler(this.BtnGen);
            this.button103.Click += new EventHandler(this.BtnGen);
            this.button104.Click += new EventHandler(this.BtnGen);
            this.button105.Click += new EventHandler(this.BtnGen);

        }

        private void button1_Click(object sender, EventArgs e)
        {
            
        }

       
        string text;
        private void BtnGen(object sender, EventArgs e)
        {

            switch (((Button)sender).Name)
            {
                case "button1":
                    {
                        text = "[" + "微笑" + "]";
                        //MessageBox.Show(text);
                        if (Epanel != null)
                        {
                            Epanel(text);
                }
                        break;
                    }
                case "button2":
                    {
                        text = "[" + "撇嘴" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button3":
                    {
                        text = "[" + "色" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button4":
                    {
                        text = "[" + "发呆" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button5":
                    {
                        text = "[" + "得意" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button6":
                    {
                        text = "[" + "流泪" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button7":
                    {
                        text = "[" + "害羞" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button8":
                    {
                        text = "[" + "闭嘴" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button9":
                    {
                        text = "[" + "睡" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button10":
                    {
                        text = "[" + "大哭" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button11":
                    {
                        text = "[" + "尴尬" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button12":
                    {
                        text = "[" + "发怒" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button13":
                    {
                        text = "[" + "调皮" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button14":
                    {
                        text = "[" + "呲牙" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button15":
                    {
                        text = "[" + "惊讶" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button16":
                    {
                        text = "[" + "难过" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button17":
                    {
                        text = "[" + "酷" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button18":
                    {
                        text = "[" + "冷汗" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button19":
                    {
                        text = "[" + "抓狂" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button20":
                    {
                        text = "[" + "吐" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button21":
                    {
                        text = "[" + "偷笑" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button22":
                    {
                        text = "[" + "愉快" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button23":
                    {
                        text = "[" + "白眼" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button24":
                    {
                        text = "[" + "傲慢" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button25":
                    {
                        text = "[" + "饥饿" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button26":
                    {
                        text = "[" + "困" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button27":
                    {
                        text = "[" + "惊恐" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button28":
                    {
                        text = "[" + "流汗" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button29":
                    {
                        text = "[" + "憨笑" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button30":
                    {
                        text = "[" + "悠闲" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button31":
                    {
                        text = "[" + "奋斗" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button32":
                    {
                        text = "[" + "咒骂" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button33":
                    {
                        text = "[" + "疑问" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button34":
                    {
                        text = "[" + "嘘" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button35":
                    {
                        text = "[" + "晕" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button36":
                    {
                        text = "[" + "疯了" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button37":
                    {
                        text = "[" + "衰" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button38":
                    {
                        text = "[" + "骷髅" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button39":
                    {
                        text = "[" + "敲打" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button40":
                    {
                        text = "[" + "再见" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button41":
                    {
                        text = "[" + "擦汗" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button42":
                    {
                        text = "[" + "抠鼻" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button43":
                    {
                        text = "[" + "鼓掌" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button44":
                    {
                        text = "[" + "糗大了" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button45":
                    {
                        text = "[" + "坏笑" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button46":
                    {
                        text = "[" + "左哼哼" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button47":
                    {
                        text = "[" + "右哼哼" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button48":
                    {
                        text = "[" + "哈欠" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button49":
                    {
                        text = "[" + "鄙视" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button50":
                    {
                        text = "[" + "委屈" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button51":
                    {
                        text = "[" + "快哭了" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button52":
                    {
                        text = "[" + "奸笑" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button53":
                    {
                        text = "[" + "亲亲" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button54":
                    {
                        text = "[" + "吓" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button55":
                    {
                        text = "[" + "可怜" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button56":
                    {
                        text = "[" + "菜刀" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button57":
                    {
                        text = "[" + "西瓜" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button58":
                    {
                        text = "[" + "啤酒" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button59":
                    {
                        text = "[" + "篮球" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button60":
                    {
                        text = "[" + "乒乓" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button61":
                    {
                        text = "[" + "咖啡" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button62":
                    {
                        text = "[" + "饭" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button63":
                    {
                        text = "[" + "猪头" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button64":
                    {
                        text = "[" + "玫瑰" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button65":
                    {
                        text = "[" + "凋谢" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button66":
                    {
                        text = "[" + "嘴唇" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button67":
                    {
                        text = "[" + "爱心" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button68":
                    {
                        text = "[" + "心碎" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button69":
                    {
                        text = "[" + "蛋糕" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button70":
                    {
                        text = "[" + "闪电" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button71":
                    {
                        text = "[" + "炸弹" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button72":
                    {
                        text = "[" + "刀" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button73":
                    {
                        text = "[" + "足球" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button74":
                    {
                        text = "[" + "瓢虫" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button75":
                    {
                        text = "[" + "便便" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button76":
                    {
                        text = "[" + "月亮" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button77":
                    {
                        text = "[" + "太阳" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button78":
                    {
                        text = "[" + "礼物" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button79":
                    {
                        text = "[" + "拥抱" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button80":
                    {
                        text = "[" + "强" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button81":
                    {
                        text = "[" + "弱" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button82":
                    {
                        text = "[" + "握手" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button83":
                    {
                        text = "[" + "胜利" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button84":
                    {
                        text = "[" + "抱拳" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button85":
                    {
                        text = "[" + "勾引" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button86":
                    {
                        text = "[" + "拳头" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button87":
                    {
                        text = "[" + "差劲" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button88":
                    {
                        text = "[" + "爱你" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button89":
                    {
                        text = "[" + "NO" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button90":
                    {
                        text = "[" + "OK" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button91":
                    {
                        text = "[" + "爱情" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button92":
                    {
                        text = "[" + "飞吻" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button93":
                    {
                        text = "[" + "跳跳" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button94":
                    {
                        text = "[" + "发抖" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button95":
                    {
                        text = "[" + "怄火" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button96":
                    {
                        text = "[" + "转圈" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button97":
                    {
                        text = "[" + "磕头" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button98":
                    {
                        text = "[" + "回头" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button99":
                    {
                        text = "[" + "跳绳" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button100":
                    {
                        text = "[" + "投降" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button101":
                    {
                        text = "[" + "激动" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button102":
                    {
                        text = "[" + "乱舞" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button103":
                    {
                        text = "[" + "献吻" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button104":
                    {
                        text = "[" + "左太极" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }
                case "button105":
                    {
                        text = "[" + "右太极" + "]";
                        if (Epanel != null)
                        {
                            Epanel(text);
                        }
                        break;
                    }

            }

            this.Visible = false;
        }


    }
}
